Skip to content

Conversation

@midas-myth
Copy link
Contributor

No description provided.

- Added AVALANCHE_FUJI to settlement and source chain IDs.
- Enhanced source chain validation in various components to include the current chain context.
- Updated multichain token mappings and added new functions for gas estimation on same-chain transactions.
- Refactored related components to ensure proper handling of source and settlement chains.
- Cleaned up unused imports and improved code readability across multiple files.
@midas-myth midas-myth self-assigned this Dec 31, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 31, 2025

Deploying gmx-interface-home with  Cloudflare Pages  Cloudflare Pages

Latest commit: 127dbf5
Status: ✅  Deploy successful!
Preview URL: https://cf5f9589.gmx-interface-home.pages.dev
Branch Preview URL: https://same-chain-multichain.gmx-interface-home.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 31, 2025

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: 127dbf5
Status: ✅  Deploy successful!
Preview URL: https://29ae2cf2.gmx-interface.pages.dev
Branch Preview URL: https://same-chain-multichain.gmx-interface.pages.dev

View logs

@midas-myth midas-myth marked this pull request as draft December 31, 2025 12:17
…nd improve source chain handling

- Changed the estimated time text from Instantly to Instant in DepositView and WithdrawalView components.
- Enhanced source chain logic in TransferDetailsView to ensure accurate chain identification for transactions.
- Updated localization files to reflect the change in text for multiple languages.
…bling functionality

- Added support for disabling dropdown items in DropdownSelector based on custom logic, including tooltip messages for disabled items.
- Introduced a new sorting function for token data in WithdrawalView to improve the display of transferable tokens.
- Updated localization files to include messages for unsupported withdrawal scenarios across multiple languages.
…lity

- Introduced multichain funding tracking by adding  to manage pending transactions.
- Updated DepositView and WithdrawalView to handle multichain deposit and withdrawal events, including logging and toast notifications for transaction success and failure.
- Refactored token balance handling in SelectAssetToDepositView to use  instead of .
- Improved transaction receipt handling to capture bridge events and update pending funding states accordingly.
@midas-myth midas-myth force-pushed the same-chain-multichain branch from 0f04d77 to 404f3f2 Compare January 14, 2026 15:03
@midas-myth midas-myth force-pushed the same-chain-multichain branch from 404f3f2 to 9a51810 Compare January 14, 2026 15:03
@midas-myth midas-myth requested a review from qwinndev January 15, 2026 11:40
@midas-myth midas-myth marked this pull request as ready for review January 15, 2026 11:55
@midas-myth
Copy link
Contributor Author

@cursor review


const filteredBalances: DisplayTokenChainData[] = useMemo(() => {
return tokenChainDataArray
const multichainTokens = tokenChainDataArray
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we extract this code to some pure function? maybe even two and then compose them

getMultichainTokens
getSettlementChainTokens

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return isFirstWithdrawal;
};

function tokenDataSorter(a: TokenData, b: TokenData): 1 | -1 | 0 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add byBalance to name and move it to some tokens utils file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

);
return mappedTokenId !== undefined;
});
return networks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's create getActiveNetworks or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


return (
MULTI_CHAIN_WITHDRAWAL_TRADE_TOKENS[chainId as SettlementChainId]
const multichainTokens =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it be moved to function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
);

const sameChainNetworkFee = useMemo(():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

await sendWalletTransaction({
chainId,
to: getContract(chainId, "MultichainTransferRouter"),
await sendSameChainWithdrawalTxn({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks really big can we extract that to hook?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted to useWithdrawViewTransactions and inside handleSameChainWithdraw and handleMultichainWithdraw

…iews

- Introduced calculateNetworkFeeDetails function to encapsulate network fee calculations based on gas limit and price.
- Refactored DepositView to utilize the new fee calculation function, improving readability and maintainability.
- Updated WithdrawalView to replace inline fee calculations with the new utility function.
- Enhanced token sorting and filtering logic in SelectAssetToDepositView for better performance and clarity.
- Adjusted indexer URLs and multichain configurations for consistency across environments.
@midas-myth
Copy link
Contributor Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!

@midas-myth
Copy link
Contributor Author

@cursor review

@midas-myth midas-myth merged commit a777a0a into release Jan 15, 2026
5 checks passed
@midas-myth midas-myth deleted the same-chain-multichain branch January 15, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants